package cn.sixmillions.yuqueblog.entity;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @description: 知识库实体类
 * @author: sixmillions
 * @since: 2021/12/12
 **/
@Data
@Accessors(chain = true)
public class Repo implements Serializable {

    private static final long serialVersionUID = 1L;

    @JSONField(name = "content_updated_at")
    private LocalDateTime contentUpdatedAt;

    /**
     * 介绍
     */
    private String description;

    /**
     * 创建时间
     */
    @JSONField(name = "created_at")
    private LocalDateTime createdAt;

    /**
     * 类型 [Book - 文档]
     */
    private String type;

    /**
     * 喜欢数量
     */
    @JSONField(name = "likes_count")
    private Integer likesCount;

    /**
     * 公开状态 [1 - 公开, 0 - 私密]
     */
    @JSONField(name = "public")
    private Integer publicType;

    /**
     * 文档数量
     */
    @JSONField(name = "items_count")
    private Integer itemsCount;

    /**
     * 更新时间
     */
    @JSONField(name = "updated_at")
    private LocalDateTime updatedAt;

    /**
     * 所属的团队/用户编号
     */
    @JSONField(name = "user_id")
    private Long userId;

    /**
     * 仓库（book）名称
     */
    private String name;

    /**
     * 创建者
     */
    @JSONField(name = "creator_id")
    private Long creatorId;

    /**
     * 仓库完整路径 user.login/book.slug
     */
    private String namespace;

    /**
     * 仓库id
     */
    private Long id;

    /**
     * 仓库路径
     */
    private String slug;

    /**
     * 订阅数量
     */
    @JSONField(name = "watches_count")
    private Integer watchesCount;

    /**
     * 用户信息
     */
    private User user;
}
